 <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
//注册路由
use think\Route;

 $version = request()->header('version');
 if($version == null){
     $version = "v1";
 }else{
     $version = 'v'.$version;
 }

 //+++会员登录+++//
 //会员登录
 Route::post('api/:'.$version.'/login/login','api/:'.$version.'.login/login');
 //学生登录
 Route::post('api/:'.$version.'/login/student_login','api/:'.$version.'.login/student_login');
 //教师登录
 Route::post('api/:'.$version.'/login/teacher_login','api/:'.$version.'.login/teacher_login');

 //用户注册
 Route::post('api/:'.$version.'/login/register','api/:'.$version.'.login/register');

 //获取用户总数
 Route::post('api/:'.$version.'/login/getUserCount','api/:'.$version.'.login/getUserCount');

 //手机号登录
 Route::post('api/:'.$version.'/login/tel_login','api/:'.$version.'.login/tel_login');

 //发送验证码
 Route::post('api/:'.$version.'/login/send_tel_code','api/:'.$version.'.login/send_tel_code');

 //验证手机验证码
 Route::post('api/:'.$version.'/login/check_tel_code','api/:'.$version.'.login/check_tel_code');

 //用户手机修改密码
 Route::post('api/:'.$version.'/login/tel_change_password','api/:'.$version.'.login/tel_change_password');

 //用户手机一步修改密码
 Route::post('api/:'.$version.'/login/tel_edit_password','api/:'.$version.'.login/tel_edit_password');

 //用户手机一步注册
 Route::post('api/:'.$version.'/login/tel_register','api/:'.$version.'.login/tel_register');

 //用户修改手机
 Route::post('api/:'.$version.'/login/change_tel','api/:'.$version.'.login/change_tel');
 //效验手机
 Route::post('api/:'.$version.'/login/check_tel','api/:'.$version.'.login/check_tel');
 //学生手机登录
 Route::post('api/:'.$version.'/login/student_tel_login','api/:'.$version.'.login/student_tel_login');
 //教师手机登录
 Route::post('api/:'.$version.'/login/teacher_tel_login','api/:'.$version.'.login/teacher_tel_login');
 //记录异常信息
 Route::post('api/:'.$version.'/login/write_app_exception','api/:'.$version.'.login/write_app_exception');

 //+++用户会员+++//
 //restful路由
 Route::resource('api/:'.$version.'/User','api/:'.$version.'.User');
 //修改用户密码
 Route::post('api/:'.$version.'/User/editPassword','api/:'.$version.'.User/editPassword');
 //获取用户数量
 Route::post('api/:'.$version.'/User/getUserCount','api/:'.$version.'.User/getUserCount');
 //获取用户信息
 Route::post('api/:'.$version.'/User/get_user_info','api/:'.$version.'.User/get_user_info');
 //查询推荐记录
 Route::post('api/:'.$version.'/User/get_rec_history','api/:'.$version.'.User/get_rec_history');
 //效验支付密码
 Route::post('api/:'.$version.'/User/check_pay_password','api/:'.$version.'.User/check_pay_password');
                            /*student控制器*/

 /*restful路由注册*/
 Route::resource('api/:'.$version.'/Student','api/:'.$version.'.Student');

 /*学生用户id获取每月奖励学币*/
 Route::post('api/:'.$version.'/Student/month_salary','api/'.$version.'.student/month_salary');
 //查询是否有每月奖励学币
 Route::post('api/:'.$version.'/Student/check_month_salary','api/:'.$version.'.student/check_month_salary');
 /*学生添加关注课程*/
 Route::post('api/:'.$version.'/Student/add_collect_lesson','api/:'.$version.'.student/add_collect_lesson');
 /*学生取消关注课程*/
 Route::post('api/:'.$version.'/Student/cancel_collect_lesson','api/:'.$version.'.student/cancel_collect_lesson');
 /*学生添加关注课程*/
 Route::post('api/:'.$version.'/Student/see_collect_lessons','api/:'.$version.'.student/see_collect_lessons');
 /*学生奖金转入学费*/
 Route::post('api/:'.$version.'/Student/rec_bonus_to_tuition','api/:'.$version.'.student/rec_bonus_to_tuition');
 //学费提现
 Route::post('api/:'.$version.'/Student/studentTuitionWithdrawals','api/:'.$version.'.student/studentTuitionWithdrawals');


 /*Donation控制器*/
 /*restful路由注册*/
Route::resource('api/:'.$version.'/Donation','api/:'.$version.'.Donation');
 /*根据学生的用户id获取捐书的奖励学币*/
Route::post('api/:'.$version.'/Donation/get_donation_coin','api/:'.$version.'.Donation/get_donation_coin');
 /*募捐人查询某人捐赠记录*/
Route::post('api/:'.$version.'/Donation/donor_get_donation_history','api/:'.$version.'.Donation/donor_get_donation_history');
 /*捐赠记录查重*/
 Route::post('api/:'.$version.'/Donation/is_donation','api/:'.$version.'.Donation/is_donation');
                             /*Account控制器*/

 /*restful路由注册*/
 Route::resource('api/:'.$version.'/Account','api/:'.$version.'.Account');
 //查询奖金流水记录
 Route::post('api/:'.$version.'/Account/bonus_record','api/:'.$version.'.Account/bonus_record');
 //查询学费流水记录
 Route::post('api/:'.$version.'/Account/tuition_record','api/:'.$version.'.Account/tuition_record');
 //查询学币流水记录
 Route::post('api/:'.$version.'/Account/coin_record','api/:'.$version.'.Account/coin_record');
 //查询用户奖金提现流水记录
 Route::post('api/:'.$version.'/Account/bonus_withdrawals_record','api/:'.$version.'.Account/bonus_withdrawals_record');
 //查询学生学费提现流水记录
 Route::post('api/:'.$version.'/Account/tuition_withdrawals_record','api/:'.$version.'.Account/tuition_withdrawals_record');
 //查询教师费用提现流水记录
 Route::post('api/:'.$version.'/Account/teacher_cost_withdrawals_record','api/:'.$version.'.Account/teacher_cost_withdrawals_record');
 //查询教师费用流水记录
 Route::post('api/:'.$version.'/Account/teacher_cost_record','api/:'.$version.'.Account/teacher_cost_record');


                            /*Order控制器*/

 /*restful路由注册*/
 Route::resource('api/:'.$version.'/Order','api/:'.$version.'.Order');
/*查询学生在上的学费课程、学币课程或者以及已上完的课程*/
 Route::post('api/:'.$version.'/order/get_lesson','api/:'.$version.'.order/get_lesson');
 /*订单新增排重*/
 Route::post('api/:'.$version.'/Order/is_order','api/:'.$version.'.Order/is_order');
 //订单账户余额支付
 Route::post('api/:'.$version.'/Order/PayOrder','api/:'.$version.'.Order/PayOrder');

                            /*Lesson控制器*/

 /*restful路由注册*/
 Route::resource('api/:'.$version.'/Lesson','api/:'.$version.'.Lesson');
 /*获取班级类型*/
 Route::post('api/:'.$version.'/Lesson/get_class_type','api/:'.$version.'.Lesson/get_class_type');
 /*获取课程科目*/
 Route::post('api/:'.$version.'/Lesson/get_subject','api/:'.$version.'.Lesson/get_subject');
 /*获取课程项目*/
 Route::post('api/:'.$version.'/Lesson/get_lesson_program','api/:'.$version.'.Lesson/get_lesson_program');
 /*获取课程服务目标*/
 Route::post('api/:'.$version.'/Lesson/get_service_target','api/:'.$version.'.Lesson/get_service_target');
 /*获取课程的教学风格*/
 Route::post('api/:'.$version.'/Lesson/get_lesson_nature','api/:'.$version.'.Lesson/get_lesson_nature');
 /*获取开课时间*/
 Route::post('api/:'.$version.'/Lesson/get_start_lesson','api/:'.$version.'.Lesson/get_start_lesson');
 /*获取年级*/
 Route::post('api/:'.$version.'/Lesson/get_grade','api/:'.$version.'.Lesson/get_grade');
 /*通过年级查询课程*/
 Route::post('api/:'.$version.'/Lesson/get_lesson_by_grade','api/:'.$version.'.Lesson/get_lesson_by_grade');
 /*修改课程信息*/
 Route::post('api/:'.$version.'/Lesson/edit_lesson_info','api/:'.$version.'.Lesson/edit_lesson_info');
 //获取课程加载选项
 Route::post('api/:'.$version.'/Lesson/get_lesson_option','api/:'.$version.'.Lesson/get_lesson_option');

                            /*Comment控制器*/
 /*restful资源路由*/
 Route::resource('api/:'.$version.'/Comment','api/:'.$version.'.Comment');
 /*用户编辑评论信息*/
 Route::post('api/:'.$version.'/Comment/add_comment','api/:'.$version.'.Comment/add_comment');
 /*教师获取上课名单*/
 Route::post('api/:'.$version.'/Comment/get_class_name_list','api/:'.$version.'.Comment/get_class_name_list');
 /*教师记录点出席情况*/
 Route::post('api/:'.$version.'/Comment/record_attend_names','api/:'.$version.'.Comment/record_attend_names');
 /*教师结束课程开放评论*/
 Route::post('api/:'.$version.'/Comment/complete_lesson','api/:'.$version.'.Comment/complete_lesson');

                           /*StudentWithdrawal控制器*/
  /*restful资源路由*/
 Route::resource('api/:'.$version.'/student_withdrawals','api/:'.$version.'.student_withdrawals');

                           /*StudentStopLesson控制器*/
 /*restful资源路由*/
 Route::resource('api/:'.$version.'/student_stop_lesson','api/:'.$version.'.student_stop_lesson');

                          /*ReClass控制器*/
 /*restful资源路由*/
 Route::resource('api/:'.$version.'/ReClass','api/:'.$version.'.ReClass');

                         /*Classroom控制器*/
 /*restful资源路由*/
 Route::resource('api/:'.$version.'/Classroom','api/:'.$version.'.Classroom');
 /*用户查询所有的教室记录和推荐的教室记录*/
 Route::post('api/:'.$version.'/Classroom/get_rec_or_own_classroom','api/:'.$version.'.Classroom/get_rec_or_own_classroom');
                        /*Teacher控制器*/
 /*restful资源路由*/
 Route::resource('api/:'.$version.'/Teacher','api/:'.$version.'.Teacher');
 /*教师获取所有发布的课程信息*/
 Route::post('api/:'.$version.'/Teacher/get_teacher_lessons','api/:'.$version.'.Teacher/get_teacher_lessons');
 //教师奖金提现
 Route::post('api/:'.$version.'/Teacher/teacherCostWithdrawals','api/:'.$version.'.Teacher/teacherCostWithdrawals');

                     /*LessonNumTime控制器*/
 /*restful资源路由*/
 Route::resource('api/:'.$version.'/LessonNumTime','api/:'.$version.'.LessonNumTime');
 /*获取课程时间*/
 Route::post('api/:'.$version.'/LessonNumTime/lesson_time','api/:'.$version.'.LessonNumTime/lesson_time');

                      /*TeacherWithdrawal控制器*/

 /*restful资源路由*/
 Route::resource('api/:'.$version.'/teacher_withdrawals','api/:'.$version.'.teacher_withdrawals');

                    /*TeacherStopLesson控制器*/

 /*restful资源路由*/
 Route::resource('api/:'.$version.'/teacher_stop_lesson','api/:'.$version.'.teacher_stop_lesson');
 /*教师停止学生上课*/
 Route::post('api/:'.$version.'/teacher_stop_lesson/teacher_stop_student_lesson','api/:'.$version.'.teacher_stop_lesson/teacher_stop_student_lesson');
 /*TeacherStopLesson控制器*/

                    /*Address资源路由*/
 /*获取省*/
 Route::post('api/:'.$version.'/Address/province','api/:'.$version.'.Address/province');
 /*获取市*/
 Route::post('api/:'.$version.'/Address/city','api/:'.$version.'.Address/city');
 /*获取县*/
 Route::post('api/:'.$version.'/Address/area','api/:'.$version.'.Address/area');
 /*获取地址编码*/
 Route::post('api/:'.$version.'/Address/get_address_code','api/:'.$version.'.Address/get_address_code');
 /*获取地址详情*/
 Route::post('api/:'.$version.'/Address/get_address_details','api/:'.$version.'.Address/get_address_details');
 /*修改会员地址*/
 Route::post('api/:'.$version.'/Address/edit_address','api/:'.$version.'.Address/edit_address');

                            /*Information控制器*/

 /*restful资源路由*/
 Route::resource('api/:'.$version.'/Information','api/:'.$version.'.Information');
/*获取未读消息*/
 Route::post('api/:'.$version.'/Information/no_read_information_list','api/:'.$version.'.Information/no_read_information_list');
                            /*Payment控制器*/
 /*阿里wap支付*/
 Route::post('api/:'.$version.'/Payment/aliWap','api/:'.$version.'.Payment/aliWap');
/*支付宝app支付*/
 Route::post('api/:'.$version.'/Payment/aliApp','api/:'.$version.'.Payment/aliApp');
/*阿里交易订单查询*/
 Route::post('api/:'.$version.'/Payment/aliQuery','api/:'.$version.'.Payment/aliQuery');
 /* 阿里交易订单关闭*/
 Route::post('api/:'.$version.'/Payment/aliClose','api/:'.$version.'.Payment/aliClose');
 /* 微信app支付*/
 Route::post('api/:'.$version.'/Payment/wxApp','api/:'.$version.'.Payment/wxApp');
/*微信订单查询*/
 Route::post('api/:'.$version.'/Payment/wxQuery','api/:'.$version.'.Payment/wxQuery');
/*支付宝异步通知*/
 Route::post('api/:'.$version.'/Payment/AliPayNotify','api/:'.$version.'.Payment/AliPayNotify');
/*微信异步通知*/
 Route::post('api/:'.$version.'/Payment/WxPayNotify','api/:'.$version.'.Payment/WxPayNotify');
/*绑定银行卡*/
 Route::post('api/:'.$version.'/Payment/bindingBank','api/:'.$version.'.Payment/bindingBank');
/*用户提现到银行卡*/
 Route::post('api/:'.$version.'/Payment/wxWithdrawals','api/:'.$version.'.Payment/wxWithdrawals');
/*查询提现记录*/
 Route::post('api/:'.$version.'/Payment/wxWithdrawalsQuery','api/:'.$version.'.Payment/wxWithdrawalsQuery');


                                   /*Recharge控制器*/
 /*生成学费充值待支付订单*/
 Route::post('api/:'.$version.'/Recharge/tuitionRecharge','api/:'.$version.'.Recharge/tuitionRecharge');
 //学币充值
 Route::post('api/:'.$version.'/Recharge/coinRecharge','api/:'.$version.'.Recharge/coinRecharge');

                                   /*Index控制器*/
/*app检测更新*/
 Route::post('api/:'.$version.'/Index/check_update','api/:'.$version.'.Index/check_update');
/*记录app异常信息*/
 Route::post('api/:'.$version.'/Index/write_app_exception','api/:'.$version.'.Index/write_app_exception');
